package com.ujiuy.springsessiondemo.Thymeleaf;

import com.ujiuy.springsessiondemo.entity.user;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class Demo2 {

    @GetMapping("/second")
    public String two(Model model){

        model.addAttribute("user",new user(1,"peng",12));
        return "index2";
    }
}
